<?php
namespace App\Library\Send;
use App\Http\Controllers\Controller;

require __DIR__.'/../jpush/autoload.php';
use JPush\Client as JPush;
use Cloud;
use Exception;
use DB;

/**
 * Class Order
 * @package App\Library\Order1111
 */
class Send
{
    public function zrc()
    {
//        dump(__DIR__);die;
        $app_key = config('config.JPush.AppKey');
        $master_secret = config('config.JPush.MasterSecret');
        $log_path = null;
        $client = new JPush($app_key, $master_secret, $log_path);
        $push = $client
            ->push()
            ->setPlatform('all')
            ->addAllAudience()
            //->addTag(['tag1', 'tag2']) //bid + token 前六位
            ->setNotificationAlert('你好啊')
            //->message('Hello JPush')
            ->send();
        return 1;
    }
}
